package jp.android.ReversePlayer;

import java.io.File;
import jp.android.ReversePlayer.SelectFileDialog.onSelectFileDialogListener;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;


public class ShowAlertDialog extends Activity implements onSelectFileDialogListener{
	
	@Override	
	public void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		//即ダイアログ表示
		SelectFile();
	}

	protected SelectFileDialog _dlgSelectFile;
	//
	private void SelectFile(){
		//
		_dlgSelectFile = new SelectFileDialog(this);
		_dlgSelectFile.Show("/sdcard/");
	}	
	public void onFileSelected_by_SelectFileDialog(File file){
		//SelectFileDialog
		if(file != null){
			Log.d("Test125","selected : " + file.getName());
		}
		else{
			Log.d("Test125","not selected");
		}
		_dlgSelectFile = null;
	}
	@Override
	public void onPause(){
		if(_dlgSelectFile != null){
			_dlgSelectFile.onPause();
		}
		super.onPause();
	}
	
}
